package com.tankwar.test.transport;

import java.util.Map;

import com.swak.Constants;
import com.swak.entity.Result;
import com.swak.reactivex.transport.Message;
import com.swak.registry.URL;
import com.swak.utils.Maps;
import com.tankwar.transport.TankwarClient;
import com.tankwar.transport.Transports;

public class ClientA {

	public static void main(String[] args) throws Exception {
		Transports transports = new Transports();
		transports.afterPropertiesSet();

		Map<String, String> params = Maps.newHashMap();
		params.put(Constants.Category_Key, "server");
		URL url = new URL("tankwar", "127.0.0.1", transports.getUrl().getPort(), params);
		TankwarClient client = transports.newClient(url);
		client.sent(Message.forMessage().setData(Result.success("我是李锋")));
	}
}
